home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / gstparam.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  3.6 KB  |  110 lines

  1. /* Copyright (C) 2000 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: gstparam.h,v 1.7 2000/09/19 19:00:32 lpd Exp $ */
  20. /* Transparency parameter definitions */
  21.  
  22. #ifndef gstparam_INCLUDED
  23. #  define gstparam_INCLUDED
  24.  
  25. #include "gsccolor.h"
  26. #include "gsrefct.h"
  27.  
  28. /* Define the names of the known blend modes. */
  29. typedef enum {
  30.     BLEND_MODE_Compatible,
  31.     BLEND_MODE_Normal,
  32.     BLEND_MODE_Multiply,
  33.     BLEND_MODE_Screen,
  34.     BLEND_MODE_Difference,
  35.     BLEND_MODE_Darken,
  36.     BLEND_MODE_Lighten,
  37.     BLEND_MODE_ColorDodge,
  38.     BLEND_MODE_ColorBurn,
  39.     BLEND_MODE_Exclusion,
  40.     BLEND_MODE_HardLight,
  41.     BLEND_MODE_Overlay,
  42.     BLEND_MODE_SoftLight,
  43.     BLEND_MODE_Luminosity,
  44.     BLEND_MODE_Hue,
  45.     BLEND_MODE_Saturation,
  46.     BLEND_MODE_Color
  47. #define MAX_BLEND_MODE BLEND_MODE_Color
  48. } gs_blend_mode_t;
  49. #define GS_BLEND_MODE_NAMES\
  50.   "Compatible", "Normal", "Multiply", "Screen", "Difference",\
  51.   "Darken", "Lighten", "ColorDodge", "ColorBurn", "Exclusion",\
  52.   "HardLight", "Overlay", "SoftLight", "Luminosity", "Hue",\
  53.   "Saturation", "Color"
  54.  
  55. /* Define the common part for a transparency stack state. */
  56. typedef enum {
  57.     TRANSPARENCY_STATE_Group = 1,    /* must not be 0 */
  58.     TRANSPARENCY_STATE_Mask
  59. } gs_transparency_state_type_t;
  60. #define GS_TRANSPARENCY_STATE_COMMON\
  61.     gs_transparency_state_t *saved;\
  62.     gs_transparency_state_type_t type
  63. typedef struct gs_transparency_state_s gs_transparency_state_t;
  64. struct gs_transparency_state_s {
  65.     GS_TRANSPARENCY_STATE_COMMON;
  66. };
  67.  
  68. /* Define the common part for a cached transparency mask. */
  69. #define GS_TRANSPARENCY_MASK_COMMON\
  70.     rc_header rc
  71. typedef struct gs_transparency_mask_s {
  72.     GS_TRANSPARENCY_MASK_COMMON;
  73. } gs_transparency_mask_t;
  74.  
  75. /* Define the parameter structure for a transparency group. */
  76. #ifndef gs_color_space_DEFINED
  77. #  define gs_color_space_DEFINED
  78. typedef struct gs_color_space_s gs_color_space;
  79. #endif
  80. /* (Update gs_trans_group_params_init if these change.) */
  81. typedef struct gs_transparency_group_params_s {
  82.     const gs_color_space *ColorSpace;
  83.     bool Isolated;
  84.     bool Knockout;
  85. } gs_transparency_group_params_t;
  86.  
  87. /* Define the parameter structure for a transparency mask. */
  88. typedef enum {
  89.     TRANSPARENCY_MASK_Alpha,
  90.     TRANSPARENCY_MASK_Luminosity
  91. } gs_transparency_mask_subtype_t;
  92. #define GS_TRANSPARENCY_MASK_SUBTYPE_NAMES\
  93.   "Alpha", "Luminosity"
  94. /* (Update gs_trans_mask_params_init if these change.) */
  95. typedef struct gs_transparency_mask_params_s {
  96.     gs_transparency_mask_subtype_t subtype;
  97.     bool has_Background;
  98.     float Background[GS_CLIENT_COLOR_MAX_COMPONENTS];
  99.     int (*TransferFunction)(P3(floatp in, float *out, void *proc_data));
  100.     void *TransferFunction_data;
  101. } gs_transparency_mask_params_t;
  102.  
  103. /* Select the opacity or shape parameters. */
  104. typedef enum {
  105.     TRANSPARENCY_CHANNEL_Opacity = 0,
  106.     TRANSPARENCY_CHANNEL_Shape = 1
  107. } gs_transparency_channel_selector_t;
  108.  
  109. #endif /* gstparam_INCLUDED */
  110.